import flash.geom.*;
import util.*;

class corejuliano.designpattern.mvc.Model
{
	private var position:Point;
	private var id:String;
	
	public function Model(id:String)
	{
		this.id = id;
	}
	
	public function setPosition(position:Point):Void
	{
		this.position = position;
	}
	// metodo que atualiza a posicao em caso de estar utilizando o modo de pixel
	public function addPosition(position:Point):Void
	{
		this.position.x += position.x;
		this.position.y += position.y;
	}	
						
	public function getPosition():Point
	{
		return position;
	}

	public function getId():String
	{
		return id;
	}
	
	public function destroy():Void
	{
		position = null;
		id = null;
	}
	
	public function toString(Void):String 
	{
		return "corejuliano.designpattern.mvc.Model";
	}
	
}